<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<style>
#myCanvas{
	background-color:#CCC;
	border:solid thin  #666;
}
</style>
<script language="javascript" src="js/bounceball.js"></script>
</head>

<body>
<canvas id="myCanvas" width="640" height="480"></canvas>
</body>
</html>

<script language="javascript">
	window.onload = function()
	{	
		var screenWidth = 640;
		var screenHeight = 480;
		
		var canvas = document.getElementById("myCanvas");
		var context = canvas.getContext("2d");	
		
		setInterval(mainLoop, 10);
		
		function mainLoop()
		{	
			// Clear Screen			
			context.clearRect(0, 0, screenWidth, screenHeight);									

//			context.font = "40pt Arial";
			context.fillText( "Example: HTML5 Fields", 20, 20 );			
			
			ball();
			context.stroke();

		}		
		
		function ball()
		{
			context.beginPath();
			context.arc(ball_x, ball_y, 25, 0, 2 * Math.PI, false);
			
			
		}
		
		
	}
	
	
</script>
